# compile app
FROM golang:latest as build

ARG APP

ENV GO111MODULE=on

ADD . src/

RUN cd src && APP=${APP} make prod

# build app image
FROM docker.io/alpine

ARG APP

COPY --from=build /go/src/build/bin/${APP} /go/main
    